/* 主容器 */
.container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

/* 上传区域 */
.uploadArea {
  border: 2px dashed #d9d9d9;
  border-radius: 8px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #fafafa;
  margin-bottom: 20px;
}

.uploadArea:hover {
  border-color: #1890ff;
  background-color: #f0f8ff;
}

.uploadArea.dragActive {
  border-color: #1890ff;
  background-color: #e6f7ff;
  transform: scale(1.02);
}

.uploadContent {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.uploadIcon {
  font-size: 48px;
  opacity: 0.6;
}

.uploadText {
  font-size: 16px;
  color: #333;
  font-weight: 500;
}

.uploadHint {
  font-size: 14px;
  color: #666;
  opacity: 0.8;
}

/* 文件列表 */
.fileList {
  margin-bottom: 20px;
}

.fileItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  margin-bottom: 8px;
  background-color: #fff;
  transition: all 0.2s ease;
}

.fileItem:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-color: #d9d9d9;
}

.fileInfo {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 12px;
}

.filePreview {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #e8e8e8;
}

.fileDetails {
  flex: 1;
  min-width: 0;
}

.fileName {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin-bottom: 4px;
  word-break: break-all;
}

.fileSize {
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
}

.uploadStats {
  margin-top: 8px;
}

.progressBar {
  width: 100%;
  height: 4px;
  background-color: #f0f0f0;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 4px;
}

.progressFill {
  height: 100%;
  background-color: #1890ff;
  transition: width 0.3s ease;
}

.progressText {
  font-size: 12px;
  color: #666;
}

.errorText {
  font-size: 12px;
  color: #ff4d4f;
  margin-top: 4px;
}

.fileActions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.actionButton {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  font-size: 16px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.actionButton:hover {
  background-color: #f5f5f5;
  transform: scale(1.1);
}

.actionButton:active {
  transform: scale(0.95);
}

/* 任务管理 */
.taskManagement {
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 16px;
  background-color: #fff;
}

.taskHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
}

.taskHeader h3 {
  margin: 0;
  font-size: 16px;
  color: #333;
  font-weight: 600;
}

.taskActions {
  display: flex;
  gap: 8px;
}

.clearButton,
.refreshButton {
  padding: 6px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  background-color: #fff;
  color: #333;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.clearButton:hover,
.refreshButton:hover {
  border-color: #1890ff;
  color: #1890ff;
}

.clearButton:active,
.refreshButton:active {
  transform: scale(0.95);
}

/* 未完成任务 */
.unfinishedTasks {
  margin-top: 16px;
}

.unfinishedTasks h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

.taskItem {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background-color: #fafafa;
  border-radius: 4px;
  margin-bottom: 8px;
  border-left: 3px solid #ffa940;
}

.taskInfo {
  flex: 1;
  min-width: 0;
}

.taskName {
  font-size: 13px;
  color: #333;
  margin-bottom: 2px;
  word-break: break-all;
}

.taskProgress {
  font-size: 12px;
  color: #666;
}

.taskStatus {
  font-size: 12px;
  color: #666;
  white-space: nowrap;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    padding: 16px;
  }
  
  .uploadArea {
    padding: 30px 16px;
  }
  
  .uploadIcon {
    font-size: 36px;
  }
  
  .uploadText {
    font-size: 14px;
  }
  
  .uploadHint {
    font-size: 12px;
  }
  
  .fileItem {
    padding: 10px;
  }
  
  .filePreview {
    width: 40px;
    height: 40px;
  }
  
  .fileName {
    font-size: 13px;
  }
  
  .fileSize {
    font-size: 11px;
  }
  
  .progressText {
    font-size: 11px;
  }
  
  .actionButton {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }
  
  .taskHeader {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .taskActions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fileItem {
  animation: fadeIn 0.3s ease;
}

/* 状态指示器 */
.fileItem[data-status="uploading"] {
  border-left: 3px solid #1890ff;
}

.fileItem[data-status="completed"] {
  border-left: 3px solid #52c41a;
}

.fileItem[data-status="failed"] {
  border-left: 3px solid #ff4d4f;
}

.fileItem[data-status="paused"] {
  border-left: 3px solid #ffa940;
}

/* 加载状态 */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}
